The QuickTime VR Manager provides functions that you can use to augment the normal user interaction handling provided by a QuickTime movie controller. For example, you can install an action filter function to handle movie controller actions; see QuickTime 3 Reference for details.
You can use the QTVRSetEnteringNodeProc function to install or remove a node-entering procedure.
OSErr QTVRSetEnteringNodeProc (
QTVRInstanceqtvr,
QTVREnteringNodeUPPenteringNodeProc,
SInt32refCon,
UInt32 flags);
The QTVRSetEnteringNodeProc function installs the procedure specified by the enteringNodeProc parameter as a node-entering procedure for the QuickTime VR movie specified by the qtvr parameter. Your procedure is called whenever a node is entered (either in response to user actions or in response to QuickTime VR Manager functions that change nodes). The reference constant specified by the refCon parameter is passed unchanged to that node-entering procedure.
To remove a previously installed node-entering procedure, set enteringNodeProc to nil .
You can use the QTVRSetLeavingNodeProc function to install or remove a node-leaving procedure.
OSErr QTVRSetLeavingNodeProc (
QTVRInstanceqtvr,
QTVRLeavingNodeUPPleavingNodeProc,
SInt32refCon,
UInt32 flags);
The QTVRSetLeavingNodeProc function installs the procedure specified by the leavingNodeProc parameter as a node-leaving procedure for the QuickTime VR movie specified by the qtvr parameter. Your procedure is called whenever a node is left (either in response to user actions or in response to QuickTime VR Manager functions that change nodes). The reference constant specified by the refCon parameter is passed unchanged to that node-leaving procedure.
To remove a previously installed node-leaving procedure, set leavingNodeProc to nil .
Use QTVRSetEnteringNodeProc to install or remove a node-entering procedure.
You can use the QTVRGetInteractionProperty function to get the value of an interaction property.
OSErr QTVRGetInteractionProperty (
QTVRInstance qtvr,
UInt32 property,
void*value);
The QTVRGetInteractionProperty function returns, in the block of memory pointed to by the value parameter, the current value of the property specified by the property parameter for the QuickTime VR movie specified by the qtvr parameter. That block of memory must be large enough to hold the returned value.
You can use the QTVRSetInteractionProperty function to set the value of an interaction property.
OSErr QTVRSetInteractionProperty (
QTVRInstanceqtvr,
UInt32 property,
void*value);
The QTVRSetInteractionProperty function sets the value of the interaction property of the type specified by the property parameter for the movie specified by the qtvr parameter to the value specified by the value parameter. For types that occupy 32 or fewer bits of memory, you pass the desired value itself (cast to a void * ) in the value parameter. For structures and floating-point values, you must pass a pointer to the desired value in the value parameter.
Floating-point values are usually stored as 32-bit values, but compilers differ in how they pass floating-point values as parameters; as a result, QTVRSetInteractionProperty demands that floating-point values always be passed by reference.
Use QTVRGetInteractionProperty to get an interaction property.
You can use the QTVRReplaceCursor function to replace any of the standard QuickTime VR cursors with your own custom cursors.
OSErr QTVRReplaceCursor (QTVRInstanceqtvr, CursorRecord *cursRecord);
The QTVRReplaceCursor function replaces one or more of the standard QuickTime VR cursors associated with the instance specified by the qtvr parameter with the cursors specified in the cursor record pointed to by the cursRecord parameter. If the type field of the specified cursor record is kQTVRUseDefaultCursor , the default cursor for the given resource ID is reloaded; in this case, the handle field of that record should be set to nil .
QTVRReplaceCursor replaces the standard cursors only for the specified QuickTime VR movie instance. To replace the standard cursors for all QuickTime VR movie instances you create, you need to call QTVRReplaceCursor for each such instance.
QuickTime VR 2.1 makes a copy of the cursor handle specified in the cursor record. The application is responsible for disposing of its own cursor handle.
| Previous | Chapter Contents | Chapter Top | Next |